package com.shark.uh.exception;

import com.shark.uh.enums.ResponseCode;
import lombok.Getter;

@Getter
public class BusinessException extends RuntimeException {

    private final ResponseCode responseCode;

    /**
     * 构造方法
     *
     * @param responseCode ResponseCode
     */
    public BusinessException(ResponseCode responseCode) {
        super(responseCode.getMessage());
        this.responseCode = responseCode;
    }

    /**
     * 构造方法
     *
     * @param responseCode ResponseCode
     * @param message      String
     */
    public BusinessException(ResponseCode responseCode, String message) {
        super(message);
        this.responseCode = responseCode;
    }

}
